﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for BUS_Accounts
/// </summary>
public class BUS_Accounts
{
    DAL_Accounts data = new DAL_Accounts();
    public void Accounts_Insert(DTO_Accounts obj)
    {

        try
        {
            data.Accounts_Insert(obj);
        }
        catch (Exception)
        {

            throw;
        }

    }
    public void Accounts_UpdateByAll(string Id, DTO_Accounts obj)
    {

        try
        {
            data.Accounts_UpdateByAll(Id, obj);
        }
        catch (Exception)
        {

            throw;
        }

    }

    public void Accounts_UpdateBySet(string Id, string Set)
    {

        try
        {
            data.Accounts_UpdateBySet(Id, Set);
        }
        catch (Exception)
        {

            throw;
        }

    }
    public void Accounts_Delete(string Id)
    {

        try
        {
            data.Accounts_Delete(Id);
        }
        catch (Exception)
        {

            throw;
        }

    }

    public DataTable Accounts_GetByAll()
    {
        DataTable dt = new DataTable();
        try
        {
            dt = data.Accounts_GetByAll();

        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
    public DataTable Accounts_GetByTop(int top, string where, string order)
    {
        DataTable dt = new DataTable();
        try
        {
            dt = data.Accounts_GetByTop(top, where, order);

        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
    public DataTable Accounts_GetByID(string id)
    {
        DataTable dt = new DataTable();
        try
        {
            dt = data.Accounts_GetByID(id);

        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
}